DisplayDeviceTree is a simple application that traverses and displays all the devices and properties of the Expansion Manager's device tree. Displayed for each device is the following:
• The nodeID.
• The device's peer nodeID.
• The device's parent node ID.
• The device's child nodeID.
• The device's name.
• The device's attributes.
For each device's property, the following infomation is displayed:
• The property name.
• The property's nodeID.
• The property's peer nodeID.
• The size of the data for the property.
• The property's data expressed as a zero-terminated string.
(Note: if there are CR chars in the string, this may cause the output to look bad)
• The property's data expressed as hex bytes (up to 512 bytes).
Should there be a problem reading the device tree, the program will display an error code and crap-out somewhere along the line. Admittedly, I didn't spend much time making sure all the error cases will get the program out of the recursive loop accurately.